package com.shop.czlmshop.controller;

import com.shop.czlmshop.pojo.Coupon;
import com.shop.czlmshop.service.CouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @version: V1.0
 * @author: xmy
 * @className: CouponController
 * @description:
 * @data: 2019-05-08 9:38
 **/
@Controller
public class CouponController {
    @Autowired
    private CouponService couponService;

    /**
     * @description: 查询全部优惠卷
     * @param:
     * @return:
     * @auther: XMY
     * @date: 2019-05-08 9:41
     */
    @GetMapping("/selAllCoupon")
    @ResponseBody
    public List<Coupon> selAllCoupon(){
        return couponService.selAllCoupon();
    }
}
